<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditImageTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditImageLabel_idImage}" for="idImage" />
                    <h:inputText id="idImage" value="#{imageController.selected.idImage}" title="#{bundle.EditImageTitle_idImage}" required="true" requiredMessage="#{bundle.EditImageRequiredMessage_idImage}"/>
                    <h:outputLabel value="#{bundle.EditImageLabel_path}" for="path" />
                    <h:inputText id="path" value="#{imageController.selected.path}" title="#{bundle.EditImageTitle_path}" required="true" requiredMessage="#{bundle.EditImageRequiredMessage_path}"/>
                    <h:outputLabel value="#{bundle.EditImageLabel_alt}" for="alt" />
                    <h:inputText id="alt" value="#{imageController.selected.alt}" title="#{bundle.EditImageTitle_alt}" required="true" requiredMessage="#{bundle.EditImageRequiredMessage_alt}"/>
                    <h:outputLabel value="#{bundle.EditImageLabel_description}" for="description" />
                    <h:inputText id="description" value="#{imageController.selected.description}" title="#{bundle.EditImageTitle_description}" required="true" requiredMessage="#{bundle.EditImageRequiredMessage_description}"/>
                    <h:outputLabel value="#{bundle.EditImageLabel_type}" for="type" />
                    <h:inputText id="type" value="#{imageController.selected.type}" title="#{bundle.EditImageTitle_type}" required="true" requiredMessage="#{bundle.EditImageRequiredMessage_type}"/>
                    <h:outputLabel value="#{bundle.EditImageLabel_idProperty}" for="idProperty" />
                    <h:selectOneMenu id="idProperty" value="#{imageController.selected.idProperty}" title="#{bundle.EditImageTitle_idProperty}" required="true" requiredMessage="#{bundle.EditImageRequiredMessage_idProperty}">
                        <f:selectItems value="#{propertyController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{imageController.update}" value="#{bundle.EditImageSaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditImageViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{imageController.prepareList}" value="#{bundle.EditImageShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditImageIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
